CC            = @CC@

INCLUDE_PCAP  = @PCAP_CFLAGS@

INCLUDE_OTHER = -I.. -I../thirdparty \
	        @ZSTD_CFLAGS@ \
                @GLIB2_CFLAGS@

install_sh = @install_sh@
mkdir_p = @mkdir_p@
INSTALL = @INSTALL@
PLUGINDIR = @prefix@/plugins
BINDIR = @prefix@/bin

SRCS=$(wildcard *.c)
SOS=$(SRCS:.c=.so)

%.so : %.c ../arkime.h ../hash.h ../dll.h ../bsb.h
	$(CC) -pthread @SHARED_FLAGS@ $(EXTRA_CFLAGS) -o $@ @CFLAGS@ -Wall -Wextra -D_GNU_SOURCE -std=gnu99 -fno-strict-aliasing -g -fPIC $(INCLUDE_PCAP) $(INCLUDE_OTHER) $<

all:$(SOS)

check:

install:
	$(INSTALL) taggerUpload.pl $(BINDIR)
	@mkdir -p "$(PLUGINDIR)"
	$(INSTALL) *.so *.jade *.js $(PLUGINDIR)
	@mkdir -p "$(PLUGINDIR)/writer-s3"
	$(INSTALL) writer-s3/*.js $(PLUGINDIR)/writer-s3

distclean realclean clean:
	rm -f *.o *.so
